﻿using System;
using EasyStep.Attributes;
using EasyStep.TestExecution.Data;
using EasyStep.TestExecution.Interfaces;
using OpenQA.Selenium;
using EasyStep.TestActions.Utils;

namespace EasyStep.TestActions.Actions.GenerateEmptyStringById
{
    [TestAction(typeof(Generator.Generator), Name = "EmptyStringById", RequireData = false, RequireLocator = true)]
    class GenerateEmptyStringById : ITestAction<IWebDriver>
    {
        public void Execute(IWebDriver browser, TestStepResult data, IExecuteDataContext context)
        {
            browser.FindElement(By.Id(data.Locator)).Clear();
        }
    }
}